File and folder thumbnail sample


Windows Runtime
User Interface
Windows RT
en-US
11/25/2013

This sample shows how to retrieve thumbnails for files and folders. It uses Windows.Storage.FileProperties API.

The sample demonstrates these tasks:

  1. Retrieve a thumbnail for a picture

  2. Retrieve album art as the thumbnail for a song

  3. Retrieve an icon as the thumbnail for a document

  4. Retrieve a thumbnail for a folder in the file system

    Note  You can't retrieve a thumbnail for the Pictures library itself because it is a virtual folder. You must choose a file system folder that has pictures in it in order to retrieve a thumbnail.

  5. Retrieve a thumbnail for a file group

    A file group is a virtual folder where all the files in the group have the criteria that you specify in common. For example, the sample shows a thumbnail for a file group wherein the files in the group all have the same month and year.

To learn about retrieving the appropriate thumbnail to display to the user, see Guidelines and checklist for thumbnails.

Important APIs in this sample include:

To obtain an evaluation copy of Windows 8.1, go to Windows 8.1.

To obtain an evaluation copy of Microsoft Visual Studio 2013, go to Visual Studio 2013.

Note  For Windows 8 app samples, download the Windows 8 app samples pack. The samples in the Windows 8 app samples pack will build and run only on Microsoft Visual Studio 2012.

Related topics

Windows 8 app samples
Related samples
File access sample
File picker sample
Folder enumeration sample
Programmatic file search sample

Related technologies

Windows.Storage namespace, Windows.Storage.FileProperties namespace

Operating system requirements

Client
Windows 8.1
Server
Windows Server 2012 R2

Build the sample

  1. Start Visual Studio 2013 and select File > Open > Project/Solution.
  2. Go to the directory in which you unzipped the sample. Go to the directory named for the sample, and double-click the Microsoft Visual Studio Solution (.sln) file.
  3. Press F6 or use Build > Build Solution to build the sample.

Run the sample

To debug the app and then run it, press F5 or use Debug > Start Debugging. To run the app without debugging, press Ctrl+F5 or use Debug > Start Without Debugging.